export const NEED_LOGIN = "/Mycenter";
export const MY_SELF = "/my_self";
import Chat from "@/views/mycenter/myself/chat/privateChat";
import Message from "@/views/mycenter/myself/chat/Message";

export default [
  {
    path: "/",
    meta: {
      title: "商城首页"
    },
    component: () =>
      import(/* webpackChunkName: "Home" */ "@/views/home/Home.vue")
  },
  {
    path: "/category",
    meta: {
      title: "产品分类"
    },
    component: () =>
      import(/* webpackChunkName: "Category" */ "@/views/category/Category.vue")
  },
  {
    path: "/trolley",
    meta: {
      title: "购物车"
    },
    component: () =>
      import(/* webpackChunkName: "Trolley" */ "@/views/trolley/Trolley.vue")
  },
  {
    path: NEED_LOGIN,
    meta: {
      title: "会员登录"
    },
    component: () =>
      import(/* webpackChunkName: "Mycenter" */ "@/views/mycenter/Mycenter.vue")
  },
  {
    path: MY_SELF,
    meta: {
      title: "个人中心",
      loginAuth: true
    },
    component: () =>
      import(/* webpackChunkName: "Mycenter" */ "@/views/mycenter/myself/my_self.vue")
  },
  {
    path: "/chat/:id",
    name: "chat",
    meta: {
      title: "联系客服",
      requireAuth: true
    },
    component: Chat
  },
  {
    path: "/chat",
    name: "chat_no",
    meta: {
      title: "联系客服",
      requireAuth: true
    },
    component: Chat
  },
  {
    path: "/message",
    name: "message",
    meta: {
      title: "消息列表",
      requireAuth: true
    },
    component: Message
  },
  {
    path: "/userinfo",
    meta: {
      title: "账号管理",
      loginAuth: true
    },
    component: () =>
      import(/* webpackChunkName: "Mycenter" */ "@/views/mycenter/myself/usersetting/userinfo.vue")
  },
  {
    path: "/address",
    meta: {
      title: "收货地址",
      loginAuth: true
    },
    component: () =>
      import(/* webpackChunkName: "Mycenter" */ "@/views/mycenter/myself/address/address.vue")
  },
  {
    path: "/newaddress",
    meta: {
      title: "新增地址",
      loginAuth: true
    },
    component: () =>
      import(/* webpackChunkName: "Mycenter" */ "@/views/mycenter/myself/address/newaddress.vue")
  },
  {
    path: "*",
    name: "notFound",
    meta: {
      title: "404-notFound"
    },
    component: () =>
      import(/* webpackChunkName: "NotFound" */ "@/views/notfound/NotFound.vue")
  }
];
